#Verify if there are several mpi versions
ifeq ($(wildcard /usr/bin/mpicc.openmpi),) 
	CC = mpicc
	RUN = mpirun
else 
	CC = mpicc.openmpi
	RUN = mpirun.openmpi	
endif

CFLAGS = -Wall -g -O2
LDFLAGS = -lrt

all: par

main.o: main.c
	${CC} ${CFLAGS} -c main.c

par: main.o
	${CC} ${CFLAGS} main.o ${LDFLAGS} -o main

clean:
	rm -f main *.o
